package CandyCraft.common;

import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.ai.EntityAIFollowParent;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAIPanic;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAITempt;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.world.World;


//Your declaration. If your mob swims, change EntityAnimal to EntityWaterMob.
public class EntityCandyGiraffe extends EntityAnimal {
        
        public EntityCandyGiraffe(World par1World) {
                super(par1World);
                this.texture = "/mods/CandyCraft/textures/mob/CandyGiraffe.png";
                //The below means if possible, it wont walk into water
                this.getNavigator().setAvoidsWater(false);
                //This is the hitbox size. I believe it starts in the center and grows outwards
                this.setSize(1.5F, 0.9F);
                //Pretty self-explanatory. 
                this.isImmuneToFire = false;
                float var2 = 0.25F;

                //Now, we have the AI. Each number in the addTask is a priority. 0 is the highest, the largest is lowest.
                //They should be set in the order which the mob should focus, because it can only do one thing at a time. I'll explain my choice for order below.
                //There are tonnes of tasks you can add. Look in the JavaDocs or other mob classes to find some more!

                //Swimming should ALWAYS be first. Otherwise if your mob falls in water, but it's running away from you or something it'll drown.
                this.tasks.addTask(0, new EntityAISwimming(this));

                //This makes the mob run away when you punch it
                this.tasks.addTask(1, new EntityAIPanic(this, 0.38F));

               

               

               

                //This makes the mob walk around. Without it, it'd just stand still.
                this.tasks.addTask(5, new EntityAIWander(this, var2));
 
                

        }

        //This is required. If it's false, none of the above takes effect.
        public boolean isAIEnabled() {
                return true;
        }
        
        //Pretty obvious, set it's health!
        public int getMaxHealth() {
                return 10;
        }
        
        //The sound effect played when it's just living, like a cow mooing.
        protected String getLivingSound() {
                return "";
        }
        
        //The sound made when it's attacked. Often it's the same as the normal say sound, but sometimes different (such as in the ender dragon)
        protected String getHurtSound() {
                return "";
        }
        
        //The sound made when it actually dies.
        protected String getDeathSound() {
                return "";
        }

        //The sound the mob plays when walking around.  
        protected void playStepSound(int par1, int par2, int par3, int par4) {
                this.worldObj.playSoundAtEntity(this, "", 0.15F,  1.0F);
        }
        
        //A basic example of what a mob should drop on death. For more advanced examples, look at code for chicken or squid.
        protected int getDropItemId() {
                return 0;
        }
        
        //This is required regardless of if your animal can breed or not. Set to null if it can't breed - I wont cover breeding here.
        public EntityAgeable createChild(EntityAgeable var1) {
                return null;
        }
}